﻿/**********************************************************************
 * @file   FITKSEAJunctionPoint.h
 * @brief  SEA点连接
 * @author BaGuijun (baguijun@163.com)
 * @date   2024-11-11
 *********************************************************************/
#ifndef _FITKSEAJunctionPoint_H
#define _FITKSEAJunctionPoint_H

#include "FITKAcousticsModelAPI.h"
#include "FITKSEAAbstractJunction.h"

namespace Acoustics
{
    /**
     * @brief  点连接结构体
     * @author BaGuijun (baguijun@163.com)
     * @date   2024-11-11
     */
    struct FITKSEAJunPointConStr
    {
        //连接对象id
        int _subSysID = -1;
        //厚度
        double _radius = 0.0;
        //是否启用修改角度
        bool _isAlphaOve = false;
        //角度值
        double _alpha = 0.0;
        //pointID
        int _pointID = -1;
    };
    /**
     * @brief  SEA点连接
     * @author BaGuijun (baguijun@163.com)
     * @date   2024-11-11
     */
    class FITKAcousticsModelAPI FITKSEAJunctionPoint :public FITKSEAAbstractJunction
    {
        FITKCLASS(Acoustics, FITKSEAJunctionPoint);
        Q_OBJECT;
    public:
        /**
         * @brief    构造函数
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        FITKSEAJunctionPoint();
        /**
         * @brief    析构函数
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        virtual ~FITKSEAJunctionPoint();
        /**
         * @brief    获取耦合对象类型
         * @return   JunctionType       对象类型
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        virtual FITKAbstractJunction::JunctionType getJunctiontType() override;
        /**
         * @brief    添加连接信息
         * @param[i] connection    连接信息
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        void appendConnection(FITKSEAJunPointConStr& connection);
        /**
         * @brief    替换所有连接信息
         * @param[i] connections   连接信息
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        void replaceConnections(QList<FITKSEAJunPointConStr>& connections);
        /**
         * @brief    获取所有连接信息
         * @return   QList<FITKSEAJunPointStr>    所有连接信息
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        QList<FITKSEAJunPointConStr> getConnections();
        /**
         * @brief    获取点的ID
         * @return   int       id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        int getPointID();
        /**
         * @brief    设置点的id
         * @param[i] id        点id
         * @author   BaGuijun (baguijun@163.com)
         * @date     2024-11-11
         */
        void setPointID(int id);

    protected:
        /**
         * @brief    更新连接
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-21
         */
        virtual void updateConnect() override;

    protected:
        /**
         * @brief  连接信息
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-11
         */
        QList<FITKSEAJunPointConStr> _connections = {};
        /**
         * @brief  点的id
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-11
         */
        int _pointID = -1;
    };
}

#endif
